package com.demo.server1.service;

import com.demo.dto.UserModifyDTO;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * Created by hunter
 *
 * @Description feign 远程接口调用
 */
@FeignClient("server2")
public interface RpcClient {

    /**
     * 普通测试
     *
     * @return
     */
    @GetMapping("/test")
    String test();

    /**
     * 分布式事务测试
     *
     * @param userModifyDTO
     * @return
     */
    @PostMapping("/testTransactional")
    String testTransactional(UserModifyDTO userModifyDTO);
}